--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 85c8fbc648110b043356c8b27e75396013ed36b4
Parents : a55d828
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-11-25T17:02:50+01:00
Compile filterlib as static dll for windows
Changes
5 files changed, 12 insertions(+), 2 deletions(-)
Diff
diff --git a/LXST/Filters.def b/LXST/Filters.def
new file mode 100644
index 0000000..1ca2e84
--- /dev/null
+++ b/LXST/Filters.def
@@ -0,0 +1,4 @@
+EXPORTS
+highpass_filter
+lowpass_filter
+agc_process
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 39f74ad..225c19b 100644
--- a/Makefile
+++ b/Makefile
@@ -26,13 +26,19 @@ build_wheel:
-@(rm ./LXST/*.so)
-@(rm ./LXST/*.pyd)
+windll:
+ cl /LD LXST/Filters.c LXST/Filters.def /Fefilterlib.dll
+ mv ./filterlib.dll ./lib/dev/
+ rm ./filterlib.exp
+ rm ./filterlib.lib
+ rm ./filterlib.obj
+
native_libs:
./march_build.sh
persist_libs:
-cp ./lib/dev/*.so ./lib/static/
-cp ./lib/dev/*.dll ./lib/static/
- -cp ./lib/dev/*.dylib ./lib/static/
release: remove_symlinks build_wheel create_symlinks
diff --git a/lib/static/filterlib.cp312-win_amd64.pyd b/lib/static/filterlib.cp312-win_amd64.pyd
deleted file mode 100644
index 9c879fd..0000000
Binary files a/lib/static/filterlib.cp312-win_amd64.pyd and /dev/null differ
diff --git a/lib/static/filterlib.dll b/lib/static/filterlib.dll
new file mode 100644
index 0000000..a4ceefd
Binary files /dev/null and b/lib/static/filterlib.dll differ
diff --git a/setup.py b/setup.py
index 1c315b6..e706ee5 100644
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,7 @@ import platform
if os.path.isfile("./skip_extensions"): BUILD_EXTENSIONS = False
else: BUILD_EXTENSIONS = True
+if os.name == "nt": BUILD_EXTENSIONS = False
if BUILD_EXTENSIONS: print(f"Building LXST with native extensions...")
else: print(f"Building LXST without native extensions...")
@@ -14,7 +15,6 @@ with open("README.md", "r") as fh: long_description = fh.read()
exec(open("LXST/_version.py", "r").read())
c_sources = ["LXST/Filters.c"]
-if os.name == "nt": c_sources.append("LXST/Platforms/windows.c")
if BUILD_EXTENSIONS: extensions = [ Extension("LXST.filterlib", sources=c_sources, include_dirs=["LXST"], language="c"), ]
else: extensions = []
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────